#ifndef __SPARSEMATRIX__H__

#define __SPARSEMATRIX__H__

void sparse_add(int **J0, double **S0, int row, int col, double val);

void sparse_compress(int **J0, double **S0, int *I, int *J, double *S, int dim);

double sparse_entry(int i, int j, int *I, int *J, double *S, int dim);

void SOR(int *I, int *J, double *S, double *rhs, double *x, int dim, double w);

//int CG(int *I, int *J, double *S, double *b, double *x, int dim);

#endif
